﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Hotel.Models.DataAccess;
using Hotel.Models.Entity;

namespace Hotel.Models.Services
{
    public class RoomService
    {
        public static List<Room> GetListRoom()
        {
            return DARoom.GetListRoom(0);
        }

        public static Room GetDetailRoom(int roomID)
        {
            return DARoom.GetListRoom(roomID)[0];
        }

        public static bool DeleteRoom(int roomID)
        {
            return DARoom.DeleteRoom(roomID);
        }

        //Insert : isUpdate = false
        //Update : isUpdate = true
        public static bool SaveRoom(Room room, bool isUpdate)
        {
            return DARoom.SaveRoom(room, isUpdate);
        }
    }
}